const path = require('path');


const fpath = '/a/b/c/index.html';

// path.extname()拿到文件的扩展名

const fext = path.extname(fpath);
console.log(fext);//输出.html